package com.ctshk.rpc.order.custom.service;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.model.TokenUser;
import com.ctshk.common.vo.OrderRefundDTO;
import com.ctshk.rpc.finance.req.supplier.AprovalReq;
import com.ctshk.rpc.order.custom.dto.order.ApprovalRefundListDTO;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderTouristRefundAddCalculationDTO;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderTouristRefundListDTO;
import com.ctshk.rpc.order.custom.dto.order.TouristRefundDetailListDTO;
import com.ctshk.rpc.order.custom.req.order.*;
import com.ctshk.rpc.order.custom.req.schedule.TripScheduleInfoReq;
import com.ctshk.rpc.order.custom.req.tourist.CustomOrderTouristIdReq;

import java.util.List;

/**
 * <p>
 * 游客退款记录 服务类
 * </p>
 *
 * @author 叶冠峰
 * @since 2021-02-22
 */
public interface ICustomizedOrderTouristRefundService {

    /**
     * 退款记录列表
     * @param req
     * @return
     */
    PageResponse<CustomOrderTouristRefundListDTO> list(CustomOrderTouristRefundListReq req);

    /**
     * 团期详情-退款明细
     * @param req
     * @return
     */
    List<CustomOrderTouristRefundListDTO> scheduleRefundList(TripScheduleInfoReq req);

    /**
     * 退款
     * @param req
     * @return
     */
    Result add(CustomOrderTouristRefundAddReq req);

    /**
     * 退款明细
     * @param req
     * @return
     */
    List<TouristRefundDetailListDTO> refundList(CustomOrderTouristIdReq req);

    /**
     * 撤回
     * @param req
     * @return
     */
    Result withdraw(CustomOrderRefundWithdrawReq req);

    /**
     * 添加计算（退款管理-退款）
     * @param req
     * @return
     */
    Result<CustomOrderTouristRefundAddCalculationDTO> addCalculation(CustomOrderTouristRefundAddCalculationReq req);

    /**
     * 操作退款
     * @param req
     * @param currentUser
     * @return
     */
    Result confirm(CustomOrderRefundWithdrawReq req, TokenUser currentUser);

    /**
     * 退款(内部接口)
     * @param refundNumber
     * @param currentUser
     * @return
     */
    Result confirmRefund(String refundNumber, TokenUser currentUser);

    /**
     * 财务中心-销售订单退款-退款详情-退款明细列表（内部接口）
     * @param refundNumber 退款单号
     * @return
     */
    Result<List<OrderRefundDTO>> refundDetailList(String refundNumber);

    /**
     * 审批
     * @param req
     * @return
     */
    Result approval(RefundApprovalReq req);

    /**
     * 不成团-退指定团期所有订单的保险（内部接口）
     * @param schedule
     * @param userId
     * @return
     */
    Result refundInsuranceBySchedule(Long schedule,Long userId);

    /**
     * 审批中心-退款信息列表
     * @param req
     * @return
     */
    Result<List<ApprovalRefundListDTO>> approvalRefundList(ApprovalIdReq req);
}
